<template>
  <div class="person">
    <h2>当前求和为：{{ sum }},放大10倍后的值：{{ bigSum }}</h2>
    <button @click="add">点我sum+1</button>
    <h2>人-useSum里面定义的接口interface：{{ obj }}</h2>
    <h2>一个人-引用的tx声明文件：{{ objI }}</h2>
    <h2>多个人-引用的tx声明文件：
      <br>
      {{ objList }}
    </h2>
    <hr>
    <img v-for="dog, index) in dogList" :src="dog" :key="index">
    <br>
    <button @click="getDog">再来一只狗</button>
  </div>
</template>
<script setup lang='ts'>
import useDog from '@/hooks/useDog'
import useSum from '@/hooks/useSum'

const {sum,add,bigSum,obj,objI,objList} = useSum()
const {dogList,getDog} = useDog()
</script>
<style scoped>
.person {
  background-color: skyblue;
  box-shadow: 0 0 10px;
  border-radius: 10px;
  padding: 20px;
}

img {
  height: 100px;
  margin-right: 10px;
}
</style>